package com.ln.dm1108.demo02;

/**
 * @author Ln
 * @version 终极版
 * @date 2022/11/8 16:07
 */
public  class FerrarIFactory {
    public static Ferrari createFerrari(String type){
        if (type.equals("488")){
            return new Ferrari488();
        }else if (type.equals("F8")){
            return new FerrariF8();
        }else {
            return null;
        }
    }
}
